<div class="widgets">

  <div class="row">
    <div class="col-xs-12">
      <ba-card title="个人信息修改" baCardClass="with-scroll">
        <div class="section">
          <div class="row" *ngIf="type==='company'">
            <div class="col-sm-12">
              <form class="form-horizontal">
                <div class="form-group row">
                  <label for="name" class="col-sm-2 control-label">人员姓名</label>
                  <div class="col-sm-6">
                    <select name="userList" class="js-states form-control" id="userList" style="width: 100%"></select>
                  </div>
                  <div class="col-sm-4">
                    <button type="submit" (click)="getUserForComp()" class="btn btn-primary pull-right;">
                      <i class="fa fa-search" aria-hidden="true"></i>查询
                    </button>
                  </div>
                </div>
              </form>
            </div>
          </div>
          <div class="row">
            <div class="col-xs-6">
              <h2>原信息</h2>
              <form class="form-horizontal">
                <div class="form-group row">
                  <label for="name" class="col-sm-5 control-label">姓名</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="name" value="{{uiModifyInfo.name}}"
                           readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="name" class="col-sm-5 control-label">身份证</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="idcard" value="{{uiModifyInfo.idcard}}"
                           readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="address" class="col-sm-5 control-label">地址</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="address"
                           value="{{uiModifyInfo.address}}"
                           readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="government" class="col-sm-5 control-label">政治面貌</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="government"
                           value="{{uiModifyInfo.government}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="telephone" class="col-sm-5 control-label">电话</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="telephone"
                           value="{{uiModifyInfo.telephone}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="birthday" class="col-sm-5 control-label">出生日期</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="birthday"
                           value="{{uiModifyInfo.birthday}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="sex" class="col-sm-5 control-label">性别</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="sex"
                           value="{{uiModifyInfo.sex}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="folk" class="col-sm-5 control-label">民族</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="folk"
                           value="{{uiModifyInfo.folk}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="province" class="col-sm-5 control-label">省份</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="province"
                           value="{{uiModifyInfo.province}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="province" class="col-sm-5 control-label">企业名称</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id=""
                           value="{{uiModifyInfo.companyname}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="schoolname" class="col-sm-5 control-label">学历</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="education"
                           value="{{uiModifyInfo.education}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="schoolname" class="col-sm-5 control-label">毕业院校</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="schoolname"
                           value="{{uiModifyInfo.schoolname}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="speciality" class="col-sm-5 control-label">专业</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="speciality"
                           value="{{uiModifyInfo.speciality}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="finishschooldate" class="col-sm-5 control-label">毕业时间</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="finishschooldate"
                           value="{{uiModifyInfo.finishschooldate}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="finishschooldate" class="col-sm-5 control-label">技术职称</label>

                  <div class="col-sm-7">
                    <input type="text" class="form-control input-no-border" id="technicaltitles"
                           value="{{uiModifyInfo.technicaltitles}}" readonly>
                  </div>
                </div>
              </form>
            </div>
            <div class="col-xs-6">
              <h2 style="color: #93D4E7;">新信息</h2>
              <form id="uiModifyForm" class="form-horizontal" [formGroup]="uiModifyForm" (ngSubmit)="onSubmit()">
                <div class="form-group row">
                  <label for="name" class="col-sm-5 control-label">姓名</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <input type="text" class="form-control update" id="newName" formControlName="userInfoSub_name"
                           [readonly]="isVerifying">
                  </div>
                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" value="{{uiModifyNewInfo?.name}}"
                           readonly>
                  </div>
                </div>

                <div class="form-group row">
                  <label for="idcard" class="col-sm-5 control-label">身份证</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <input type="text" class="form-control update" id="newIdCard" formControlName="userInfoSub_idcard"
                           [readonly]="isVerifying">
                  </div>
                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" value="{{uiModifyNewInfo?.idcard}}"
                           readonly>
                  </div>
                </div>

                <div class="form-group row">
                  <label for="address" class="col-sm-5 control-label">地址</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <input type="text" class="form-control update" id="newAddress" formControlName="userInfoSub_address"
                           [readonly]="isVerifying">
                  </div>
                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" value="{{uiModifyNewInfo?.address}}"
                           readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="government" class="col-sm-5 control-label">政治面貌</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <select class="form-control update" id="newGovernment" formControlName="userInfoSub_government"
                            [disabled]="isVerifying">
                      <option *ngFor="let politicalStatus of politicalStatuses" value="{{politicalStatus}}">
                        {{politicalStatus}}
                      </option>
                    </select>
                  </div>
                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" value="{{uiModifyNewInfo?.government}}"
                           readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="telephone" class="col-sm-5 control-label">电话</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <input type="text" class="form-control update" id="newTelephone"
                           formControlName="userInfoSub_telephone"
                           [readonly]="isVerifying">
                  </div>
                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" value="{{uiModifyNewInfo?.telephone}}"
                           readonly>
                  </div>
                </div>

                <div class="form-group row">
                  <label for="birthday" class="col-sm-5 control-label">出生日期</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <my-date-picker name="userInfoSub_birthday" class="update" [options]="options"
                                    (dateChanged)="onDateChanged($event, 'userInfoSub_birthday')"></my-date-picker>
                  </div>
                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" id="newBirthday"
                           value="{{uiModifyNewInfo?.birthday}}" readonly>
                  </div>
                </div>

                <div class="form-group row">
                  <label for="sex" class="col-sm-5 control-label">性别</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <select class="form-control" id="userInfoSub_sex" formControlName="userInfoSub_sex" value="{{uiModifyNewInfo?.sex}}">
                      <option value="男">男</option>
                      <option value="女">女</option>
                    </select>
                  </div>
                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" id="newSex" value="{{uiModifyNewInfo?.sex}}"
                           [readonly]>
                  </div>
                </div>

                <div class="form-group row">
                  <label for="folk" class="col-sm-5 control-label">民族</label>
                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <select class="form-control" id="userInfoSub_folk" formControlName="userInfoSub_folk">
                      <option [value]="race" *ngFor="let race of races">{{race}}</option>
                    </select>
                  </div>
                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" id="newFolk"
                           value="{{uiModifyInfo.folk}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="province" class="col-sm-5 control-label">省份</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <select class="form-control" id="userInfoSub_province" formControlName="userInfoSub_province">
                      <option [value]="province" *ngFor="let province of provinces">{{province}}</option>
                    </select>
                  </div>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" id="newprovince"
                           value="{{uiModifyInfo.province}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="schoolname" class="col-sm-5 control-label">企业名称</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <select name="enterpriseName" class="js-states form-control" id="enterpriseName" style="width: 100%"></select>
                    <!--<input type="text" class="form-control" id="enterpriseName" placeholder="不填为个人">-->
                  </div>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" id="newscompanyname"
                           value="{{uiModifyInfo.companyname}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="schoolname" class="col-sm-5 control-label">学历</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <!--<input type="text" class="form-control update" formControlName="userInfoSub_education"-->
                           <!--[readonly]="isVerifying">-->
                    <select class="form-control" id="userInfoSub_education" formControlName="userInfoSub_education">
                      <option [value]="education" *ngFor="let education of educations">{{education}}</option>
                    </select>
                  </div>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" id="neweducation"
                           value="{{uiModifyInfo.education}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="schoolname" class="col-sm-5 control-label">毕业院校</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <input type="text" class="form-control update" formControlName="userInfoSub_schoolname"
                           [readonly]="isVerifying">
                  </div>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" id="newschoolname"
                           value="{{uiModifyInfo.schoolname}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="speciality" class="col-sm-5 control-label">专业</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <input type="text" class="form-control update" formControlName="userInfoSub_speciality"
                           [readonly]="isVerifying">
                  </div>
                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" id="newspeciality"
                           value="{{uiModifyInfo.speciality}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="finishschooldate" class="col-sm-5 control-label">毕业时间</label>
                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <my-date-picker name="userInfoSub_finishschooldate" class="update" [options]="options"
                                    (dateChanged)="onDateChanged($event, 'userInfoSub_finishschooldate')"></my-date-picker>
                  </div>
                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control" id="newFinishschooldate"
                           value="{{uiModifyInfo.finishschooldate}}" readonly>
                  </div>
                </div>
                <div class="form-group row">
                  <label for="province" class="col-sm-5 control-label">技术职称</label>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified != '待审核'">
                    <select class="form-control" id="userInfoSub_technicaltitles" formControlName="userInfoSub_technicaltitles">
                      <option [value]="technicaltitles" *ngFor="let technicaltitles of technicaltitles">{{technicaltitles}}</option>
                    </select>
                  </div>

                  <div class="col-sm-7" *ngIf="uiModifyNewInfo?.verified == '待审核'">
                    <input type="text" class="form-control input-no-border" id="newtechnicaltitles"
                           value="{{uiModifyInfo.technicaltitles}}" readonly>
                  </div>
                </div>
              </form>
            </div>
            <div class="col-xs-12" *ngIf="isVerifying === true">
              <b style="color: red;">正在审核中，不可修改</b>
            </div>
            <div class="col-xs-12">
              <button class="btn btn-primary confirm-btn" (click)="addUserinfoModify('save')" [disabled]="isVerifying">
                保存
              </button>
              <button type="submit" class="btn btn-primary" (click)="addUserinfoModify('submit')"
                      [disabled]="isVerifying">提交
              </button>
              <span *ngIf="_errorMsg" style="color: red">{{_errorMsg}}</span>
            </div>
          </div>
        </div>
      </ba-card>
    </div>
  </div>
</div>
